This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
~August Opboosietsi 20.Jan.04 08:01 PM a Web browser Applications Development6.0.3Windows 2000
Hi,
I have a Lotus script that detaches all atachments on a document to a directory on the C:\ Drive.
Sub Click(Source As Button)
'-- Get Front and Backend Document
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = ws.currentdocument
Dim doc As NotesDocument
Set doc = UIDoc.document
'-- Create Session object to access Notes.ini "Directory" value
Dim Session As New NotesSession
Dim dirpath As String
dirpath = session.GetEnvironmentString( "Directory", True )
'-- Loop through all attachments in document and detach to Notes Data Directory
Dim rtitem As Variant
Set rtitem = doc.GetFirstItem( "Body" )
'-- if array of embedded objects exist then detach all attachments into the Notes Data directory
If Isarray( rtitem.EmbeddedObjects ) Then
Forall o In rtitem.EmbeddedObjects
If ( o.Type = EMBED_ATTACHMENT ) Then
fullpath$ = dirpath + "\Quality\" + o.source
Messagebox(fullpath$)
Call o.ExtractFile( fullpath$ )
End If
End Forall
End If
Messagebox(fullpath$)
End Sub
Is there anyway I can have a button to do the reverse? Attach all files within a directory & remove the files from the directory after they have been attached ?